perm filename PROB4.PUB[LSP,JRA] blob sn#314466 filedate 1977-10-28 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	.CENT(Problems involving list-notation)
C00004 ENDMK
C⊗;
.CENT(Problems involving list-notation)
.NL
.BEGIN tabit1(4);centerit;
1.##Discuss ←%3cons[%9α%41%3;cons[%9α%42%3;%9α%43%3]]%1 
\as opposed to ←%3cons[%9α%41%3;cons[%9α%42%3;#cons[%9α%43%3; NIL]]]%1 
\as a representation for %3(%9α%41%3, %9α%42%3, %9α%43%3)%1 
.END
.P12:
.BEGIN tabs 4,20,36,52,68;select 1;turn on "\";krk;nofill;
.GROUP
.P65:
.PT18;
2.##Translate the following lists into S-expr dotted-pair notation.
\%2a.%3 (A B C)  \%2b.%3 (A)  \%2c.%3 ((A))  \%2d.%3 (A (B (C))) \%2e.%3 (NIL) 
.APART
.end
.BEGIN tabs 4,20,36,54;select 1;turn on "\";krk;nofill;
.GROUP
%1
.pt2;
.ONCE FILL
Now go the other way and translate the following S-exprs into list notation.
.PT2
\%2f.%3 ((A . (B . NIL)) . ((C . NIL) . NIL))  \%2g.%3 (NIL . NIL)
.pt2
\%2h.%3 (CONS . ((QUOTE . (A . NIL)) . NIL))
.pt18
.APART
.GROUP
%1

3.##Evaluate the following:
.tabit2(4,40)
.pt2
\%2a.%3 first[(A B)]  \%2b.%3 rest[(A B)]   
.pt2
\%2c.%3 concat[A;(B C)]  \%2d.%3 concat[A;NIL]
.pt2
\%2e.%3 concat[eq[A;A];(A B C)] \%2f.%3 first[rest[(A B)]]
.APART
.END